package com.yzh.croom.service.impl;

import com.yzh.croom.mapper.RoomMapper;
import com.yzh.croom.model.domain.Room;
import com.yzh.croom.repository.RoomRepository;
import com.yzh.croom.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoomServiceImpl implements RoomService {

    @Autowired
    private RoomRepository roomRepository;
    @Autowired
    private RoomMapper roomMapper;
    @Override
    public List<Room> getAllRoom() {
        return roomRepository.getAllRoom();
    }

    @Override
    public int addRoom(Room room) {
        return roomMapper.addRoom(room);
    }
}
